﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using SimpleForum.Data.Models;

namespace SimpleForum.Classes.Core.Extensions
{
    public static class ForumExtensions
    {
        public static Thread GetNewestThread(this Forum Forum)
        {
            return Forum.Threads.OrderByDescending(Thread => Thread.CreatedDate).FirstOrDefault();
        }
    }
}